<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>签到送红包</title>
    <link rel="stylesheet" type="text/css" href="/css/public/reset.css">
    <link rel="stylesheet" type="text/css" href="/css/public/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="/css/public/function.css">
    <link rel="stylesheet" type="text/css" href="/css/style.css">

    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/model/jquery.SuperSlide.2.1.1.source.js"></script>
    <script type="text/javascript" src="/js/model/html5.js"></script>
    <script type="text/javascript" src="/js/public.js"></script>
    <script type="text/javascript">
        var flagInvalide = false;

        function back() {
            postResult({{.rank}});
        }
    </script>
    <script type="application/javascript">
        function postResult(rank) {
            if (flagInvalide) {
                return;
            }
            flagInvalide = true;
            jQuery.post("/{{if eq .devicetype 1}}device{{else}}user{{end}}/getresult?rankFrontPage=" + rank, function (data) {
                console.log(data.Data.toString());
                if (data.Code != 0) {
                    if (rank === "0") {
                        setTimeout('goToPageQrcode()', 2000);
                    } else {
                        $(".dialog").find(".d-main").children('p').text("系统错误，请重新抽奖！");
                    }
                }
                setTimeout('goToPageQrcode()', 2000);
            });
        }

        function goToPageQrcode() {
            window.location.href = "/message?msg=抽奖成功！稍后将会推送抽奖结果，请耐心等候！";
        }

        setInterval(function () {
            $(".dialog").css('display', 'block');
            $(".dialog").find(".d-main").children('p').text("长时间未抽奖，抽奖已失效");
            //postResult("0");
        }, 40000);
    </script>
    <script type="text/javascript" src="/js/app.js"></script>
    <style>
        body, html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background-color: #ec3436;
        }
    </style>
</head>
<body class="g-body-in" style="
			background-color: #ec3436;">
<div class="g-wrap"
     style="background-image: url('/img/shakehead.png');background-size: contain;background-repeat: no-repeat">
    <section class="h15" style="height: 150px"></section>
    <section class="main-sec pt5 main-wheel">
        <div class="big-border">
            <div class="small-border g9">


                <div class="shan">
                    <span>{{.point.Point4}}{{if eq .point.Point4Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic4}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point5}}{{if eq .point.Point5Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic5}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point6}}{{if eq .point.Point6Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic6}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point7}}{{if eq .point.Point7Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic7}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point8}}{{if eq .point.Point8Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic8}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point9}}{{if eq .point.Point9Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic9}}" width="30%">
                </div>

                <div class="shan">
                    <span>{{.point.Point1}}{{if eq .point.Point1Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic1}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point2}}{{if eq .point.Point2Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic2}}" width="30%">
                </div>
                <div class="shan">
                    <span>{{.point.Point3}}{{if eq .point.Point3Type 0}}积分{{else}}元现金{{end}}</span>
                    <img src="{{.point.PointPic3}}" width="30%">
                </div>

                <img src="/img/middle.png" width="50%" class="middle">
            </div>
        </div>
    </section>
    <section style="background-image: url(/img/name.png);width: 100%;height: 100px;background-size: 95%;background-repeat:  no-repeat;background-position:  center;vertical-align: middle;">
        <img src="{{.user.HeadImgURL}}"
             style="border-radius: 100%;height: 50px;margin-top: 30px;margin-left: 70px;float: left;margin-right: 10px;">
        <span style="color: #44abf9;font-size: 18px;display:  inline-block;vertical-align:  middle;margin-top: 48px;margin-bottom: 5px;">{{.user.WxToken}}</span><br>
    {{/*<span style="color: #ec3436;font-size: 14px;display:  inline-block;vertical-align: middle;">{{.user.WxOpenId}}</span>*/}}
    </section>
    <script type="text/javascript">
        jQuery(".loptop").slide({
            mainCell: "dl",
            autoPage: true,
            effect: 'topLoop',
            autoPlay: true,
            scroll: 3,
            vis: 3,
            easing: 'swing',
            delayTime: 500,
            interTime: 3000,
            pnLoop: true
        });
    </script>
</div>


<div class="dialog theForm">
    <div class="d-main">
        <p>恭喜你,抽奖成功,获得了{{.pointValue}}{{if eq .ranktype 0}}积分{{else}}元现金{{end}},请注意查收</p>
        <div class="btn-w">
            <a class="btn btn-lang close" href="javascript:;">确定</a>
        </div>
    </div>
</div>


</body>

<script type="text/javascript">
    var valueJson = {
        'wheelBody': $('.big-border'), //转盘主体
        'wheelSmall': $('.small-border'), //转盘内部
        'starsNum': 16, //转盘边缘小黄点个数

        'starsPostion': [[50, 0.5], [70, 6], [84.5, 18], [92.5, 32], [95.5, 50], [91, 68], [81.5, 81.5], [68, 91], [50, 95.5], [32, 92.5], [16, 83], [6, 70], [0.5, 50], [3.5, 32], [14, 15], [27, 5.5]], //小圆点坐标
        'actionRan': 3560 - 17 + 40 * (10 - Number({{.rank}})), //转盘转动弧度
        'theOnce': 0, //初始化转盘第一个
        'startBtn': $('.middle'), //开始按钮

        //需要后台传值的参数
        'is_gz': 1, //是否开启关注 1开 2 关
        'is_follow': 1 //是否关注

    };
    indexApp.init(valueJson).wheelStart(); //应用开始
</script>
</html>